{strip}

{literal}

<script>

</script>

{/literal}

<!-- content -->
<div id="content">
    <div id="content_left">
		{if $loggedUser->getIsAdministrator()}
			{include file='backoffice/menu.tpl'}
		{/if}
		
	</div>
	<div id="content_right" style="width: 770px;">
		<div>
			<h2>ORDERS</h2>
		</div>
		<div style="text-align: center;">
			<h3>My Account <em style="font-size: 10pt; color: #808080;">{$smarty.now|date_format:'%A / %B %e, %Y / %H:%M:%S'}</em></h3>
			<hr style="height: 2px; color: #DDDDDD; width: 70%" />
			<h1 style="margin-bottom: 5px; margin-top: 2px;">Order status and tracking</h1>
			<p style="width: 55%; color: #808080; margin: auto;">
				Here you can track the status for your new orders and know if it got already printed or shipped. Once the skin leaves the factory, its shipping progress can be tracked via the DHL/UPS tracking tool (just click the icon)
			</p>
		</div>
		<h2>Pending deliveries</h2>

		{foreach $orders as $or}
		<div class="orders_list" style="background-color: #F1F6F9; margin-bottom: 20px; padding: 10px;">
			<div class="left">
				<h4 style="padding: 0px; margin: 0px; margin-bottom: 5px;">ORDER {$or->getId()}/{$or->getOrderDate()}</h4>
				<div>
					<div class="left">
						<p style="margin-top: 20px;margin-bottom: 20px; margin-right: 10px; font-size: 11pt;">ORDER STATUS
					</div> 
					{foreach $or->getStatusChanges() as $st}
						<div class="left" style="background-color: #FCEFE2">
							<p style="text-align: center;">{$st.status}</p>
							<p style="background-color: {if $st.id != ''}#59A446{else}#CD3626{/if}; width: 110px; height: 20px; border-right: 2px solid #EEE; border-bottom: 2px solid #EEE;"> </p>
							<p style="font-size: 7pt; text-align: center; width: 110px; height: 20px; ">{$st.add_date}</p>
						</div>
					{/foreach}
					<div class="left">
						{$or->getShippingService()->getThumb(65,65)}
					</div>
					<div class="clear"> </div>
				</div>
				
			</div>
			<div class="clear"> </div>
			<div id="accountCheckoutSummary">
			<hr size="1" />
               	<div class="basketList">
               		<div class="basketListArticle left" style="height: auto; text-align: center;">Article</div>
               		<div class="basketListArtwork left" style="height: auto; text-align: center;">Artwork</div>
               		<div class="basketListProduction left" style="height: auto; text-align: center;">Skin Production</div>
               		<div class="basketListQuantity left" style="height: auto; text-align: center;">Quantity</div>
               		<div class="basketListTotal right" style="height: auto; text-align: center;">TOTAL</div>
               	</div>
               	<div class="clear"> </div>
			{foreach $or->getDetailsSplited() as $det}
				
					<div class="{cycle values='basketListBlue,basketListPink'}" style="width: 100%; height: 55px;">
                		<div class="basketListArticle left" >
                			<div class="left"  style="border-right: 2px solid #DDD; border-bottom: 2px solid #DDD; margin-top: 5px;margin-left: 2px;">{$det->getArtwork()->getArtwork()->getThumb($thumbs->checkout->width, $thumbs->checkout->height)}</div>
                			<div class="left " style="width: 90px; border: 0px; margin: 2px; font-size: 8pt;">
              				
	               				<p><strong>Title:</strong> {$det->getArtwork()->getName()}</p>
                				<p><strong>By:</strong> {$det->getArtwork()->getArtwork()->getDesigner()}</p>

                			</div>
                			<div class="clear"> </div>
                			
                		</div>
                		<div class="basketListArtwork left">
                			<div class="left " style="width: 90px; border: 0px; margin: 2px; ">
                				<p class="" style="font-size: 10pt; text-align: center; padding: 5px;"><strong>&euro; {$det->getArtworkPrice()|string_format:"%.2f"}</strong></p>
                			</div>
                		</div>
                		<div class="basketListProduction left" style="text-align: center;">
                			<div class="left"  style="background: #FFFFFF; border-right: 2px solid #DDD; border-bottom: 2px solid #DDD;  margin-top: 2px;margin-left: 2px;">
                				{$det->getDevice()->getThumb($thumbs->checkout->width, $thumbs->checkout->height)}
                			</div>
                				<p class="" style="font-size: 10pt;padding: 5px;"><strong>&euro; {$det->getOveralPrintingPrice()|string_format:"%.2f"}</strong></p>
                				<p class="" style="font-size: 9pt;"><i>
                				(for {$det->getDevice()->getDeviceManufacturer()->getManufacturer()} {$det->getDevice()->getModel()|escape}&nbsp;/&nbsp; 
                					{foreach $det->getMatrices() as $m}
                						{if $m@index == 0}
                							{$m->getName()}
                						{else}
                							&nbsp;& {$m->getName()}
                						{/if}
                					{/foreach})</i>
                				</p>
                		</div>
                		<div class="basketListQuantity left">
                			<p style="text-align: center; margin-top: 5px; ">
                				{$det->getQuantity()}
                			</p>
                		</div>
                		
                		<div class="basketListTotal right">
                			<strong><p style="font-size: 10pt; text-align: center; padding: 2px; margin-top:5px;">&euro; <font class="tPrice" id="tPrice_{$det@index}">{(($det->getQuantity()*$det->getOveralPrintingPrice())+$det->getArtworkPrice())|string_format:"%.2f"}</font></p></strong>
                		</div>
                		<div class="clear"> </div>
                	</div>
                	<div class="clear"></div>
			{/foreach}
		</div>
		</div>
		{/foreach}
		
	</div>
</div>
<!-- end content  -->
{/strip}